import java.util.*;

class UnusualAdd {
    public int addAB(int A, int B) {
        if (A==0){
            return B;
        }

        while(B!=0){
            int sum = A^B;
            int tmp = (A&B)<<1;
            A = sum;
            B = tmp;
        }
        return A;
    }
}

public class Text1 {
    public static void main(String[] args) {
        int a=2,b=3;
        UnusualAdd un = new UnusualAdd();
        int x=un.addAB(a,b);
        System.out.println(x);
    }
}
